﻿using JTTD.Common.Enum;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace JTTD.DataBase.Model.CompanyUserInfo
{
    /// <summary>
    /// 管理员/商户基本信息
    /// </summary>
    [Table("t_company_user_info")]
    public class CompanyUserInfoModel : BaseModel
    {
        /// <summary>
        /// 用户名/店家名称
        /// </summary>
        [Column("userName")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Column("password")]
        public string Password { get; set; }

        /// <summary>
        /// 用户类型（0普通用户，1店家，2商城管理员）
        /// </summary>
        [Column("userType")]
        public UserTypeEnum UserType { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        [Column("phone")]
        public string Phone { get; set; }

        /// <summary>
        /// 微信openId
        /// </summary>
        [Column("openId")]
        public string OpenId { get; set; }

        /// <summary>
        /// 入驻时间
        /// </summary>
        [Column("createTime")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 头像链接
        /// </summary>
        [Column("head_url")]
        public string HeadUrl { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        [Column("auditStatus")]
        public AuditStatusEnum AuditStatus { get; set; } = AuditStatusEnum.ToBeAudited;

        /// <summary>
        /// 楼层
        /// </summary>
        [Column("floor")]
        public int Floor { get; set; } = 1;

        /// <summary>
        /// 店铺地址
        /// </summary>
        [Column("address")]
        public string Address { get; set; }

        /// <summary>
        /// 店铺类型
        /// </summary>
        [Column("shopType")]
        public string ShopType { get; set; }

        /// <summary>
        /// 商户简介
        /// </summary>
        [Column("shop_detail")]
        public string ShopDetail { get; set; }

        /// <summary>
        /// 是否可以撤销优惠券核销(0否，1是)
        /// </summary>
        [Column("isRevokeCoupon")]
        public int IsRevokeCoupon { get; set; } = 0;
    }
}
